package com.jade.zsy.base.entity;

import com.jade.bss.db.IdEntity;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;


/**
 * 业务编码规则
 * User: jinya
 * Date: 2017/5/31
 * Time: 11:08
 * TEL :17701640710   MAIL:2009_jinya@163.com
 * To change this template use File | Settings | File Templates.
 */
@Data
@Entity
@Table(name = "ZSY_BASE_BUSINESS_CODE")
public class BusinessCode extends IdEntity {

    public static final int RULE_EMPTY=0;//空编码
    public static  final int RULE_FIXED=1;//固定编码
    public static  final int RULE_SUPPLIER=2;//供应商编码
    public static  final int RULE_SKU=3;//货号或者商品编码
    public static  final int RULE_TYPE=4;//商品属性或者特性
    public static  final int RULE_RANDOM=5;//商品属性或者特性

    public  static final int TYPE_EMPTY=0;//没有
    public  static final int TYPE_YEAR_1=1;//年（17）
    public  static final int TYPE_YEARMONTH_1=2;//年月（1706）
    public static  final int TYPE_YEARMONTHDAY_1=3;//年月日（170610）
    public static  final int TYPE_YEAR_2=4;//年（17）
    public  static final int TYPE_YEARMONTH_2=5;//年月（1706）
    public static  final int TYPE_YEARMONTHDAY_2=6;//年月日（170610）

    public static final int MODEL_SEC=1;//系统配置
    public static final  int MODEL_BASE=3;//基础模块
    public static final int MODEL_PURCHASE=5;//采购模块
    public static final int MODEL_SALES=7;//销售模块
    public static final int MODEL_INVENTORY=9;//库存模块
    public static final int MODEL_FINANCE=13;//财务模块
    public static final int MODEL_LOAN=16;//融资模块
    public static final int MODEL_RETRAIL=20;//分销商模块

    public static final String KEY_BASE_ORG="KEY_BASE_ORG";//组织编码
    public static final String KEY_BASE_EMPLOYEE="KEY_BASE_EMPLOYEE";//基础模块
    public static final String KEY_BASE_STORE="KEY_BASE_STORE";//店铺编号
    public static final String KEY_BASE_SUPPLIER="KEY_BASE_SUPPLIER";//供应商编号
    public static final String KEY_BASE_PARTNER="KEY_BASE_PARTNER";//客户编号
    public static final String KEY_BASE_SKU_BRAND="KEY_BASE_SKU_BRAND";//商品品牌
    public static final String KEY_BASE_WAREHOUSE="KEY_BASE_WAREHOUSE";//基础模块

    public static final String KEY_PUR_PO="KEY_PUR_PO";//采购订单
    public static final String KEY_PUR_JH_PO="KEY_PUR_JH_PO";//采购进货单
    public static final String KEY_PUR_TH_PO="KEY_PUR_TH_PO";//采购退货单

    public static final String KEY_SALES_SO="KEY_SALES_SO";//销售订单
    public static final String KEY_SALES_JH_SO="KEY_SALES_JH_SO";//销售单
    public static final String KEY_SALES_RECEIVABLE="KEY_SALES_RECEIVABLE";//应收账款
    public static final String KEY_SALES_TH_SO="KEY_SALES_TH_SO";//销售退货
    public static final String KEY_CRM_CODE="KEY_CRM_CODE";//销售退货
    @Column(name = "key", nullable = false,updatable = true)
    private String key;//关键
    @Column(name = "model", nullable = false, updatable = true)
    private int model;//模块
    @Column(name = "title", nullable = false, updatable = true)
    private String title;//标题
    @Column(name = "firstLevel", nullable = false, updatable = true)
    private int firstLevel=RULE_EMPTY;//第一级别
    @Column(name = "firstType", nullable = false, updatable = true)
    private int firstType=TYPE_EMPTY;//第一级别类型
    @Column(name = "firstObject", nullable = false, updatable = true)
    private String firstObject;
    @Column(name = "secondLevel", nullable = false, updatable = true)
    private int secondLevel=RULE_EMPTY;//第二级别
    @Column(name = "secondType", nullable = false, updatable = true)
    private int secondType=TYPE_EMPTY;//第二级别类型
    @Column(name = "secondObject", nullable = false, updatable = true)
    private String secondObject;
    @Column(name = "thirdLevel", nullable = false, updatable = true)
    private int thirdLevel=RULE_EMPTY;//第三级别
    @Column(name = "thirdType", nullable = false, updatable = true)
    private int thirdType=TYPE_EMPTY;//第二级别类型
    @Column(name = "thirdObject", nullable = true, updatable = true)
    private String thirdObject;
    @Column(name = "sixLevle", nullable = true, updatable = true)
    private int sixLevle=RULE_EMPTY;
    @Column(name = "serialNoLength", nullable = true, updatable = true)
    private int serialNoLength;
    @Column(name = "preCodeNo", nullable = true, updatable = true)
    private String preCodeNo;

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public int getModel() {
        return model;
    }

    public void setModel(int model) {
        this.model = model;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getFirstLevel() {
        return firstLevel;
    }

    public void setFirstLevel(int firstLevel) {
        this.firstLevel = firstLevel;
    }

    public int getFirstType() {
        return firstType;
    }

    public void setFirstType(int firstType) {
        this.firstType = firstType;
    }

    public String getFirstObject() {
        return firstObject;
    }

    public void setFirstObject(String firstObject) {
        this.firstObject = firstObject;
    }

    public int getSecondLevel() {
        return secondLevel;
    }

    public void setSecondLevel(int secondLevel) {
        this.secondLevel = secondLevel;
    }

    public int getSecondType() {
        return secondType;
    }

    public void setSecondType(int secondType) {
        this.secondType = secondType;
    }

    public String getSecondObject() {
        return secondObject;
    }

    public void setSecondObject(String secondObject) {
        this.secondObject = secondObject;
    }

    public int getThirdLevel() {
        return thirdLevel;
    }

    public void setThirdLevel(int thirdLevel) {
        this.thirdLevel = thirdLevel;
    }

    public int getThirdType() {
        return thirdType;
    }

    public void setThirdType(int thirdType) {
        this.thirdType = thirdType;
    }

    public String getThirdObject() {
        return thirdObject;
    }

    public void setThirdObject(String thirdObject) {
        this.thirdObject = thirdObject;
    }

    public int getSixLevle() {
        return sixLevle;
    }

    public void setSixLevle(int sixLevle) {
        this.sixLevle = sixLevle;
    }

    public int getSerialNoLength() {
        return serialNoLength;
    }

    public void setSerialNoLength(int serialNoLength) {
        this.serialNoLength = serialNoLength;
    }

    public String getPreCodeNo() {
        return preCodeNo;
    }

    public void setPreCodeNo(String preCodeNo) {
        this.preCodeNo = preCodeNo;
    }
}
